package com.xiaoq.jobs;

import com.alibaba.dubbo.config.annotation.Reference;
import com.xiaoq.apis.user.IPushMessageApi;
import com.xiaoq.positionmarket.service.IPositionMarketService;
import com.xiaoq.positionmarket.service.IPositionPushRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by chenjh on 2018/4/8.
 *  因为 Quart 不能通过spring 注入,需定义一个新的Bean
 *  从application中获取相关service 以及 dubbo Api
 */
@Component
public class ServiceBeanApiConfig {

    @Reference(interfaceClass=IPushMessageApi.class, check=false, version="1.0.0")
    private IPushMessageApi pushMessageApi;

    @Autowired
    private IPositionMarketService positionMarketService;

    @Autowired
    private IPositionPushRecordService positionPushRecordService;







    public IPositionMarketService getPositionMarketService() {
        return positionMarketService;
    }

    public IPositionPushRecordService getPositionPushRecordService() {
        return positionPushRecordService;
    }

    public IPushMessageApi getPushMessageApi() {
        return pushMessageApi;
    }
}
